home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-06 | 1.6 KB | 65 lines | [TEXT/MMCC] |
- //
- // UTurboTCP.h
- //
- // TurboTCP library
- // Utility functions
- //
- // Copyright © 1993-95, FrostByte Design / Eric Scouten
- //
-
- #pragma once
-
-
- //***********************************************************
- //
- // Miscellaneous public constants
- //
-
- enum {
- minReceiveSize = 4096, // minimum TCP receive buffer
- recReceiveSize = 16384, // recommended TCP buffer size
- recAutoRecNum = 4, // recommended # of auto-receive calls (set higher for high performance)
- recAutoRecSize = 4 // recommended size of RDS for auto-receive (set higher for high performance)
- };
-
-
- //***********************************************************
- //
- // custom OSErr codes: start from +23000 since MacTCP starts with -23000
- //
-
- enum {
- noTCPError = 23000, // MacTCP is not installed
- noResolverErr = 23002, // MacTCP’s DNR is not available
- resolverInUse = 23003, // resolver call object was already being used
- resolverBusy = 23004 // MacTCP’s DNR was busy
- };
-
-
- //***********************************************************
-
- class UTurboTCP {
-
- // This utility class provides some application-wide services from TurboTCP.
- // It is meant to be the standard entry point for those functions that are not part
- // of the CTCPEndpoint interface.
-
- public:
-
- // opening/closing TCP services
-
- static void InitTCP();
- static void CloseTCP();
-
- // processing network events
-
- static void ProcessNetEvents(short maxEventsToProcess, long maxTicks,
- Boolean inBackground = false);
-
- // IP address utilities
-
- static unsigned long GetLocalIPAddr();
- static void DoAddrToStr(unsigned long theIPaddr, char* theString);
-
- };
-